package com.library.system.domain.vo.home;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Package: com.library.system.domain.vo
 * @ClassName: SysLendCount
 * @Author: Yin
 * @Date: 11:06
 * @Description: 首页借阅 统计 vo
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysHomeLendCountVo {

    /** 年份统计 */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long year;

    /** 月份统计 */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long month;

    /** 借阅数量 （包括续借）*/
    private Long borrow;

    /** 归还数量 */
    @JsonProperty("return")
    private Long returns;

    public static SysHomeLendCountVo emptyYear(long year) {
        return new SysHomeLendCountVo(year,null,0L,0L);
    }

    public static SysHomeLendCountVo emptyMonth(long month) {
        return new SysHomeLendCountVo(null,month,0L,0L);
    }
}
